import 'package:json_annotation/json_annotation.dart';
part 'EcyGoodsHomeIPModel.g.dart';

@JsonSerializable()
class EcyGoodsHomeIPModel {
  String? remark;
  String? code;
  String? name;
  String? id;
  String? iconUrl;
  bool? selected;
  bool? myIp;
  String? commodityIpCode;
  EcyGoodsHomeIPModel(
      this.remark, this.code, this.name, this.id, this.iconUrl, this.selected, this.myIp, this.commodityIpCode);

  // 从JSON创建User实例的工厂方法
  factory EcyGoodsHomeIPModel.fromJson(Map<String, dynamic> json) =>
      _$EcyGoodsHomeIPModelFromJson(json);

  // 将User实例转换为JSON的方法
  Map<String, dynamic> toJson() => _$EcyGoodsHomeIPModelToJson(this);

  EcyGoodsHomeIPModel copyWith(
      {String? remark,
      String? code,
      String? name,
      String? id,
      String? iconUrl,
      bool? selected,
      bool? myIp}) {
    return EcyGoodsHomeIPModel(remark, code, name, id, iconUrl, selected, myIp, commodityIpCode);
  }
}
